package com.example.drzhang.oengldemo.util;

/**
 * Created by drzhang on 2018/1/10.
 */

public class Geometry {

    /**
     * 
     */
    public static class Point{
        public float x;
        public float y;
        public float z;

        public Point(float x, float y, float z) {
            this.x = x;
            this.y = y;
            this.z = z;
        }

        public Point translateY(float distance){
            return new Point(x, y+distance, z);
        }
    }

    public static class Circle{
        public float radius;
        public Point center;

        public Circle(float radius, Point center) {
            this.radius = radius;
            this.center = center;
        }

        public Circle scale(float ratio){
            return new Circle(radius * ratio, center);
        }
    }

    public static class Cylinder{
        public float radius;
        public Point center;
        public float height;

        public Cylinder(float radius, Point center, float height) {
            this.radius = radius;
            this.center = center;
            this.height = height;
        }
    }
}
